<template>
    <div class="sidebar">
        <el-row class="tac">
            <el-col :span="3">
                <el-menu
                default-active="2"
                class="sidebar-el-menu"
                @open="handleOpen"
                @close="handleClose"
                background-color="#324157"
                text-color="#bfcbd9" 
                active-text-color="#20a0ff"
                unique-opened
                router>
                <el-submenu index="1">
                    <template slot="title">
                        <i class="el-icon-location"></i>
                        <span>导航一</span>
                    </template>
                    <el-menu-item index="1-1">选项1</el-menu-item>
                    <el-menu-item index="1-2">选项2</el-menu-item>
                </el-submenu>

                <el-menu-item index="3" disabled>
                    <i class="el-icon-document"></i>
                    <span slot="title">导航三</span>
                </el-menu-item>
                <el-menu-item index="4">
                    <i class="el-icon-setting"></i>
                    <span slot="title">导航四</span>
                </el-menu-item>
                </el-menu>
            </el-col>
        </el-row>    
    </div>
</template>

<script>
export default {
    name: 'Sidebar',
    methods: {
        handleOpen() {

        },
        handleClose() {

        }
    }
}

</script>


<style>
.sidebar{
    display: block;
    position: absolute;
    left: 0;
    top: 70px;
    bottom:0;
    overflow-y: scroll;
}
.sidebar::-webkit-scrollbar{
        width: 0;
}
.sidebar-el-menu:not(.el-menu--collapse){
        width: 250px;
}
.sidebar > ul {
        height:100%;
}

</style>